import request from '@/utils/request'
import type { MaterialType, MaterialListResult } from './types'

class APIMaterial {
    /** 店主-未登录 */
    static getMaterial(type: MaterialType, params?: PageQuery) {
        return request<any, ResponseData<MaterialListResult[]>>({
            url: '/getMaterial',
            method: 'POST',
            data: { type },
            params
        })
    }
    /** 店主-已登录 */
    static getLoginMaterial(type: MaterialType, params?: PageQuery) {
        return request<any, ResponseData<MaterialListResult[]>>({
            url: '/getLoginMaterial',
            method: 'POST',
            data: { type },
            params
        })
    }

}

export default APIMaterial
